	function showuser(data){
		var $topList=$("#top_list");
		var html="";
		if(data.success){
			append("<li><a href='mobi_client.htm'>手机客户端</a></li>");
			append("<li class='relative have_menu'>");
			append("<a href='javascript:;'>"+data.data.user.userName+"</a>");
			append("<div class=\"user_menu\">");
			append("	<div><a id='board' href=\"javascript:;\">画板</a></div>");
			append("	<div><a id='get' href=\"javascript:;\">采集</a></div>");
			append("	<div><a id='like' href=\"javascript:;\">喜欢</a></div>");
			append("	<div><a id='atMe' href=\"javascript:;\">@我的</a></div>");
			append("	<div><a id='mymessage' href=\"javascript:;\">我的消息</a></div>");
			append("	<div><a id='findUser' href=\"javascript:;\">邀请&查找好友</a></div>");
			append("	<div><a id='accountSetting' href=\"javascript:;\">账号设置</a></div>");
			append("	<div><a id='logout' href=\"javascript:;\">退出登陆</a></div>");
			append("</div>");
			append("</li>");
			append("<li><a id='share' class='iframe' title='分享' href='gather.htm'>+分享</a></li>");
			append("<li><img style='width:28px;' src='"+(data.data.user.headPortrait==null||data.data.user.headPortrait==''?"images/default_headpic.jpg":data.data.user.headPortrait)+"'/></li>");
		}else{
			append("<li><a href='mobi_client.htm'>手机客户端</a></li>");
			append("<li><a href='register.htm'>注册</a></li>");
			append("<li class=''><a href='login.htm'>登录</a></li>");
		}
		$topList.append(html);
		
		function append(str){
			html+=str;
		}
		
		/*
		$.cookies.set( 'sessid', 'dh3tr62fghe' );
		var sessid = $.cookies.get( 'sessid' );
		$.cookies.del( 'sessid' );
		if( $.cookies.test() ) //测试浏览器是否启用了cookie
		 */
		
		$("a#share").fancybox({
			'modal':false,
			'overlayShow':true,
			'hideOnOverlayClick':false,
			'enableEscapeButton':false,
			'centerOnScroll':true,
		});
		//退出登陆
		$("a#logout").click(function(){
			$.post("logout.action",{},function(data,status){
				$.cookies.del('session_id');
				$topList.empty();
				showuser({success:false});
			});
		});
		
		//进入 
		$(".have_menu").mouseenter(function(){
			$(this).children("div").show(300);
		});
		//离开
		$(".have_menu").mouseleave(function(){
			$(this).children("div").hide();
		});
		//进入 
		$(".user_menu").mouseenter(function(){
			$(this).show();
		});
		//离开
		$(".user_menu").mouseleave(function(){
			$(this).hide(300);
		});
		
		//点击文档
		$(document).click(function(){
			$(".user_menu").hide(300);
		});
	}